package cHelper

import (
	"time"
)

func MillisToTime(ms int64) time.Time {
	return time.Unix(ms/1000, (ms%1000)*int64(time.Millisecond)).Local()
}

func MillisToFormat(ms int64, layout string) string {
	return MillisToTime(ms).Format(layout)
}

func SecondsToTime(s int64) time.Time {
	return time.Unix(s, 0).Local()
}

func SecondsToFormat(s int64, layout string) string {
	return SecondsToTime(s).Format(layout)
}
